# -*- coding: utf-8 -*-
# Copyright 2017-2019 ControlScan, Inc.
#
# This file is part of Cyphon Engine.
#
# Cyphon Engine is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# Cyphon Engine is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cyphon Engine. If not, see <http://www.gnu.org/licenses/>.
#
# Generated by Django 1.10.1 on 2017-03-20 16:23
from __future__ import unicode_literals

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('destinations', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Action',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('api_module', models.CharField(default='handlers', help_text='The module that will handle the API request.', max_length=32, validators=[django.core.validators.RegexValidator('[a-zA-Z_][a-zA-Z0-9_]*', 'Not a valid Python identifier')])),
                ('api_class', models.CharField(help_text='The class that will handle the API request.', max_length=32, validators=[django.core.validators.RegexValidator('[a-zA-Z_][a-zA-Z0-9_]*', 'Not a valid Python identifier')])),
                ('visa_required', models.BooleanField(default=False, help_text='Whether API calls are restricted by a Visa.')),
                ('title', models.CharField(help_text="A short description of the Action's result (e.g., JIRA Issue). This is used to describe the Dispatch returned by a completed Action.", max_length=40, null=True, unique=True)),
                ('description', models.CharField(help_text='A short description of the Action in active tense (e.g., "Create a JIRA Issue"). This is used to describe the Action in a list of options.', max_length=40, null=True, unique=True)),
                ('platform', models.ForeignKey(help_text='The package that will handle the API request.', on_delete=django.db.models.deletion.CASCADE, to='destinations.Destination')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='action',
            unique_together=set([('platform', 'api_class')]),
        ),
    ]
